import request, { AxiosResponse } from "@/utils/request";

const createGood = (file: any): Promise<AxiosResponse<any>> => {
  return request({
    method: 'post',
    url: 'api/good/create',
    data: file
  });
};
interface GoodListType {
    limit?: number
    page?: number
}

const getGoodList = (options: GoodListType = { limit: 10, page: 1 }): Promise<AxiosResponse<any>> => {
  return request({
    method: 'get',
    url: 'api/good/list',
    data: options
  });
};

export {
  createGood,
  getGoodList
};